<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla modelitem library
jimport('joomla.application.component.modellist');

class CouponsModelShops extends JModelList
{
    public function __construct()
    {
        $this->_db = JFactory::getDbo();
        parent::__construct();
    }    

    protected function getListQuery() 
    {
        $query = $this->_db->getQuery(true);
        $query->select('id, name, userId');
        $query->from('#__shops');
        $query->order('userId');
        
        return $query;
    }
    
    public function delete()
    {
       return LogicHelper::deleteRecordsList('Shop');
    }
}

?>
